#ifndef NEOSWITCHBUTTONPRIVATE_H
#define NEOSWITCHBUTTONPRIVATE_H

#include "stdafx.h"
#include <QPainter>

class QPropertyAnimation;
class NeoSwitchButton;
class NeoSwitchButtonPrivate : public QObject
{
    Q_OBJECT
    NEO_PRIVATE_CREATE(NeoSwitchButton)
    NEO_PROPERTY_CREATE(int, Position)
    NEO_PRIVATE_PROPERTY_CREATE_H(bool, Checked)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, IndicatorCheckedColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, IndicatorUncheckedColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, BackgroundCheckedColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, BackgroundUncheckedColor)
public:
    NeoSwitchButtonPrivate(QObject *parent = nullptr);
    ~NeoSwitchButtonPrivate();

    void startPositionAnimation();
    void updateWidgetGeometry(QSize size);

private:
    void drawBackground(QPainter *painter);
    void drawIndicator(QPainter *painter);

private:
    int pIndicatorRadius;
    QPropertyAnimation *pPositionAnimation;
};

#endif